<?php
class Menu extends CI_Controller {

	public function index(){
		//$menu = show_menu();
		//$this->load->view('menu', $menu);
		/*
		$this->load->helper(array('form', 'url'));
		$this->load->library('form_validation');
		$this->form_validation->set_rules('username', '帳號', 'required');
		$this->form_validation->set_rules('password', '密碼', 'required');
		if($this->form_validation->run()==FALSE){
			$this->load->view('menu');
		}else{
			$this->load->view('welcome_message');
		}
		*/
		$data = "1";
		$this->template->set('title', '標題'); //網頁標題
		$this->template->load('templates/default', 'menu', $data);
	}
	
	private function genMenu(){
		$obj = &get_instance();
		$obj->load->helper('url');
		$menu = anchor("start/hello/fred","Say hello to Fred |");
		$menu .= anchor("start/hello/bert","Say hello to Bert |");
		$menu .= anchor("start/another_function","Do something else |");
		return $menu;
	}
}
?>